package com.bjut.vendormgrsys.model.repository;

import com.bjut.vendormgrsys.model.domain.CampaignExpansionPO;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

public interface CampaignExpansionRepository  extends JpaRepository<CampaignExpansionPO, String>, JpaSpecificationExecutor<CampaignExpansionPO> {

    List<CampaignExpansionPO> findAllByCampaignUserId(String campaignUserId);

    List<CampaignExpansionPO> findAllByCampaignId(String campaignId);

    List<CampaignExpansionPO> findAllByCampaignIdAndUserId(String campaignId, String userId);

    CampaignExpansionPO findCampaignExpansionPOByCampaignIdAndUserIdAndType(String campaignId, String userId, String type);
}
